/**
 * @Author     :lanbery
 * @e-mail     : lanbery@gmail.com
 * @version    : V1.0
 * @createtime : 2011-11-7-下午05:21:48
 */
package com.lambor.common.mapper;

import java.util.List;

import org.springframework.dao.DataAccessException;

/**
 * @about this class : 封装最常用的查询方法
 * @author           ： lanbery
 * @e-mail           : lanbery@gmail.com
 * @version          : V1.0
 * @modifytime       : 2011-11-7-下午05:21:48
 * @filepath         : SSI-com.lambor.common.mapper//BaseSqlMapper.java
 *
 */
public interface BaseSqlMapper<T> extends SqlMapper {
	/**
	 * 
	 * @method annotations: 添加记录
	 * @creator           :lanbery
	 * @createtime        : 2011-11-15-下午04:01:33 
	 * @param entity
	 * @throws DataAccessException            :void
	 * BaseSqlMapper.method()
	 *
	 */
    public void add(T entity) throws DataAccessException;
    /**
     * 
     * @method annotations: 修改记录
     * @creator           :lanbery
     * @createtime        : 2011-11-16-下午02:25:39 
     * @param entity
     * @throws DataAccessException            :void
     * BaseSqlMapper.method()
     *
     */
    public void edit(T entity) throws DataAccessException;
    /**
     * 
     * @method annotations: 删除记录
     * @creator           : lanbery
     * @createtime        : 2011-11-16-下午02:29:55 
     * @param entity
     * @return
     * @throws DataAccessException            :boolean
     * BaseSqlMapper.method()
     *
     */
    public void remove(T entity) throws DataAccessException;
    /**
     * 
     * @method annotations: 查询一条记录
     * @creator           : lanbery
     * @createtime        : 2011-11-16-下午05:44:10 
     * @param enetity
     * @return
     * @throws DataAccessException            :T
     * BaseSqlMapper.method()
     *
     */
    public T selectOne(T entity) throws DataAccessException;
    /**
     * 
     * @method annotations: 获取多条记录
     * @creator           :lanbery
     * @createtime        : 2011-11-15-下午04:04:44 
     * @param entity
     * @return
     * @throws DataAccessException            :List<T>
     * BaseSqlMapper.method()
     *
     */
    public List<T> queryList(T entity) throws DataAccessException;
    /**
     * 
     * @method annotations: 获取记录总数
     * @creator           :lanbery
     * @createtime        : 2011-11-16-下午02:27:51 
     * @return
     * @throws DataAccessException            :int
     * BaseSqlMapper.method()
     *
     */
    public int queryTotalNum(T entity) throws DataAccessException;
    
}
